
class DisplayUtils extends BaseClass{
    public constructor(){
        super();
    }

    public createBitmap(resName:string):egret.Bitmap {
        var result:egret.Bitmap = new egret.Bitmap();
        var texture:egret.Texture = RES.getRes(resName);
        result.texture = texture;
        return result;
    }

    public createEuiImage(resName:string):eui.Image {
        var result:eui.Image = new eui.Image();
        var texture:egret.Texture = RES.getRes(resName);
        result.source = texture;
        return result;
    }

    public removeFromParent(child:egret.DisplayObject) {
        if (child.parent == null)
            return;

        child.parent.removeChild(child);
    }
}